from aip import AipContentCensor
def text(data):
    """ 你的 APPID AK SK """
    APP_ID = '44344633'
    API_KEY = 'qkm1oiVLl6vefchBQtsoxE4n'
    SECRET_KEY = 'TPGObsXwYeyTSwGS5mGNf7WaUrtO3VR2'

    """ 新建AipContentCensor """
    client = AipContentCensor(APP_ID, API_KEY, SECRET_KEY)

    """ 调用文本审核接口 """
    result = client.textCensorUserDefined(data)
    print(result)
    return result

APPID = "46782459"
API_KEY = "qkm1oiVLl6vefchBQtsoxE4n"
SECRET_KEY = "TPGObsXwYeyTSwGS5mGNf7WaUrtO3VR2"

from aip import AipImageCensor
client = AipImageCensor(APPID,API_KEY,SECRET_KEY)

def tupian(img):
    result = client.imageCensorUserDefined(img)
    return result